Repository navigation
Census sample: the sampling rule as one .dag fold, checked against the pin at the pin's revision - #12475
Merged
Conversation
…t the pin's revision sample_paths_by_rule is the single authority for reference_conservation_stratified_ sample_paths: strata of dag/ (2 segments) and src/v2/ (3), quota max(6, round_half_even(300*share)), 8,000-byte cap (sample_file_within_cap: code points bound bytes from below, so only short text is encoded), indices floor(i*n/k). reference_conservation_sample_by_rule_at_pin_exit reads the tree at reference_conservation_stratified_sample_revision out of the object store (collect_step0_subject_vector_at) and refuses unless the rule reproduces the pin. Receipt: rc=0 over all 6,880 .dag blobs at 8fcd8e7 (536 s). Floor claims pin each part of the rule on supplied file sets, each red by mutation (half-up rounding, ceil indices, no floor of 6, code points for bytes). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…guous bare ends_with Floor refused 3832455 with UnimportedBareProvider: ends_with also names a corpus function (gunbc.rust_item_scan), so the bare call is an unimported provider in a file that declares imports. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ot by a gate Review 71995: 'checked rather than asserted' claimed more than any gate enforces. The comment now states that the pin-to-revision check executes only when the instrument is run, and that a repin must run it again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Re review 71995's observation about "checked rather than asserted": agreed, the wording claimed more than any gate enforces. Fixed in 9035df4. The comment beside the pin now says:
— sent from tidy-otter-111 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Census sample: the sampling rule as one
.dagfold, checked against the pin at the pin's revisionFollow-up to #12334, agreed with the XL-2 manager (option A of the escalation).
reference_conservation_stratified_sample_pathswas a hand-copied list with the selection rule stated only in prose. DESIGN §6 says "name the instrument"; this gives the list an instrument.What is added (
v2.compiler.reference_conservation_census)sample_paths_by_rule(files), the rule's single authority..dagfiles underdag/andsrc/v2/and sorts them by path. One pass then groups the strata: every stratum's paths share a prefix ending at a segment boundary, so sorting makes each stratum a contiguous run.dag/and the first 3 undersrc/v2/.k = max(6, round_half_even(300 * stratum count / total)), capped at the stratum's small-file count.floor(i*n/k)over the stratum's files of at most 8,000 bytes, sorted by path.sample_file_within_cap(content). UTF-8 never takes fewer bytes than code points, so text over 8,000 code points is over the cap without being encoded. Only shorter text is encoded to count its bytes.reference_conservation_stratified_sample_revisionrecords the pin's revision next to the list (8fcd8e77b8…), so the pairing is explicit.reference_conservation_sample_by_rule_at_pin_exit, the instrument. It reads the tree at the pinned revision from the git object store (gunbc.namespace_step0_subject_collectorcollect_step0_subject_vector_at), applies the rule, and exits non-zero, naming both differences, unless the result is exactly the pinned list.Why at the pin's revision and not the checked-out tree. The sample is a snapshot. Comparing it to a tree that has since grown would red on every PR that adds or resizes a
.dagfile: a change detector, not a check (DESIGN §5). Checked at its own revision, a difference can only mean the pin or the rule is wrong.Receipt (the instrument, run once)
The rule, in
.dag, reproduces the pinned 316-path list exactly.Recorded, not hidden:
fec339d561was produced by a Python one-off that took indices with a float step. At that tree, the float step and exactfloor(i*n/k)differ in one stratum.Controls (floor, supplied file sets; each red by mutation)
In
v2.test.claim.namespace_xl0.reference_conservation_census:the_rule_takes_its_quota_at_the_floor_indices_holdsceil(i*n/k))a_share_under_the_floor_takes_six_holdsa_half_share_rounds_to_even_holdsthe_cap_counts_bytes_not_code_points_holdsé(8,000 code points, 8,001 bytes) is over; 7,998 +éis withinthe_cap_admits_exactly_eight_thousand_bytes_holdsa_small_stratum_takes_every_small_file_holds,a_file_outside_the_rule_roots_is_never_selected_holds,strata_are_two_segments_under_dag_and_three_under_src_v2_holdssrc/v1excluded; stratum depthAll claims are green locally. The three large fixture file sets are nullary and enrolled warm in
v2.workflow.floor_pure_producer_share, so each claim pays only for the rule it runs.🤖 Generated with Claude Code